package interfaz;

import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLayeredPane;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import java.awt.Toolkit;
import java.awt.Font;

public class MensajeConsulta extends JDialog {

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			MensajeConsulta dialog = new MensajeConsulta("hi");
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public MensajeConsulta(String msg) {
		setIconImage(Toolkit.getDefaultToolkit().getImage(MensajeConsulta.class.getResource("/assets/Iconos/16622756-signo-de-interrogacion-verde-brillante-icono-sobre-fondo-blanco.png")));
		setBounds(100, 100, 502, 235);
		getContentPane().setLayout(new BorderLayout());
		
		JLayeredPane layeredPane = new JLayeredPane();
		getContentPane().add(layeredPane, BorderLayout.CENTER);
		
		JLabel lblWarning = new JLabel("");
		lblWarning.setIcon(new ImageIcon(MensajeConsulta.class.getResource("/assets/Iconos/16622756-signo-de-interrogacion-verde-brillante-icono-sobre-fondo-blanco.png")));
		lblWarning.setBounds(10, 37, 118, 122);
		layeredPane.add(lblWarning);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(154, 37, 311, 122);
		layeredPane.add(scrollPane);
		
		JTextArea textError = new JTextArea(msg);
		scrollPane.setViewportView(textError);
		textError.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
		textError.setEditable(false);
		
		JLabel lblConsulta = new JLabel("Consulta");
		lblConsulta.setFont(new Font("Tahoma", Font.BOLD, 15));
		lblConsulta.setBounds(259, 11, 82, 14);
		layeredPane.add(lblConsulta);
	}

}
